﻿<%@ Import Namespace="ScrumDashboardMvc.Models" %>
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<DashboardViewData>" %>

<asp:Content ContentPlaceHolderID="HeadContent" runat="server">
    
    <link href="<%=Page.ResolveUrl("~/Content/black-tie/jquery-ui-1.7.2.custom.css")%>" rel="stylesheet" type="text/css" />
    <link href="<%=Page.ResolveUrl("~/Content/Dashboard/Dashboard.css")%>" rel="stylesheet" type="text/css" />
    <script src="<%=Page.ResolveUrl("~/Content/Libs/jquery-1.3.2.min.js")%>" type="text/javascript"></script>
    <script src="<%=Page.ResolveUrl("~/Content/Libs/jquery-ui-1.7.2.custom.min.js")%>" type="text/javascript" ></script>
    <script src="<%=Page.ResolveUrl("~/Content/Dashboard/Dashboard.js")%>" type="text/javascript" ></script>
    <script src="<%=Page.ResolveUrl("~/Content/Libs/jquery.validate.min.js")%>" type="text/javascript"></script>
    <script src="<%=Page.ResolveUrl("~/Content/Libs/MicrosoftMvcJQueryValidation.js")%>" type="text/javascript"></script>
    <script src="<%=Page.ResolveUrl("~/Content/Libs/jquery-jtemplates.js")%>" type="text/javascript"></script>

    <script type="text/javascript">
        var tfsWebAccessRelative = '<%=System.Configuration.ConfigurationManager.AppSettings["tfsWebAccess"]%>';
        var currentUserInitials = '<%= Model.Initials %>';
    </script>

</asp:Content>
<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">
    <div class="dashboard">
        <div id="topBar">
            <% Html.RenderPartial("DisplayTemplates/ToolbarViewData", Model.Toolbar); %>
        </div>
        
        <% Html.RenderPartial("Filters"); %>
        
        <div id="overview-placeholder">Loading..</div>

        <div class="workspace-tools">
            <ul>
                <li><a class="NewProductBacklogItem" href="#">New..</a></li>
                <li><a class="AddProductBacklogItem" href="#">Add..</a></li>
            </ul>
        </div>


        <div class="Workspace content">
        <% foreach (ProductBacklogItem pb in Model.Sprint.ProductBacklog) { %>
            <div class="ShowWorkItems ProductBacklog Backlog-<%= pb.State.Replace(" ", "") %>" data-productbacklogid="<%= pb.Id %>">
                <div class="info StateBox"><%: pb.State %>, <strong><%: pb.StoryPoints %></strong> story points, <strong><%: pb.WorkRemaining %>h</strong> remaining</div>
                <h1>
                    <span class="Togglers">
                        <a href="#ShowWorkItems" class="ShowWorkItems">[+]</a>
                        <a href="#HideWorkItems" class="HideWorkItems">[-]</a>
                    </span>
                    <%: pb.Title%>
                    <span><a style="color: Gray;" class="BacklogId" title="<%: String.Format("{0}: {1}", pb.Id, pb.Title) %>" href="javascript: openWorkItemWithRefresh(<%:pb.Id%>)">(#<%: pb.Id %>)</a></span>
                    <span class="StateBox"> <%:pb.State%></span>
                </h1>
                <div class="WorkItems">
                    <%Html.RenderPartial("Taskboard", pb); %>
                    <%Html.RenderPartial("AcceptanceTests", pb); %>
                    <%Html.RenderPartial("Impediments", pb); %>
                </div>
            </div>
        <%} %>
        </div>
    </div>

    <%Html.RenderPartial("NewTaskDialog",new SprintBacklogTask());%>
    <%Html.RenderPartial("NewTaskDialog",new Impediment());%>
    <%Html.RenderPartial("NewTaskDialog",new AcceptanceTest());%>
    <%Html.RenderPartial("ImportTaskDialog", Model.AllProjects);%>
    <%Html.RenderPartial("NewProductBacklogItemDialog",new ProductBacklogItem());%>
    <%Html.RenderPartial("AddProductBacklogItemDialog");%>

</asp:Content>
